package ltd.hanamaki.review.basic;

public class Demo { // ctrl + h

    public void t() {
        System.out.println("外部类");

        class Inner {
            public void t1() {
                System.out.println("局部内部类");
            }
        }

        Inner inner = new Inner();
        inner.t1();

    }

        class Inner {
            public void inner() {
                System.out.println("内部类");
            }
        }


    public static void main(String[] args) {
        Demo demo = new Demo();
        demo.t();

        Inner inner = new Demo().new Inner();
        inner.inner();

        new Demo().t();


        UserService userService = new UserService() {

            public void t() {
                System.out.println("我是接口");
            }
        };// alt + enter + enter

        userService.t();

    }


}
 class Demo1 {

}

interface UserService {

     void t();

}
